package com.bygf.curve;

import java.awt.BasicStroke;
import java.awt.Color;

/**
 * 曲线渲染器，存储曲线颜色、画笔样式、是否突出绘制数据点等
 *
 * @author sunyupei
 */
public class CurveRender {

    //曲线显示标识
    private boolean curveVisible = true;
    //线条颜色
    private Color color = Color.RED;
    //画笔样式
    private BasicStroke stroke = new BasicStroke(1);
    //是否突出绘制数据点
    private boolean shapeVisible = false;

    /**
     * 构造方法
     */
    public CurveRender() {
    }

    /**
     * 获取线条颜色
     *
     * @return 线条颜色
     */
    public Color getColor() {
        return color;
    }

    /**
     * 设置线条颜色
     *
     * @param color 线条颜色
     */
    public void setColor(Color color) {
        this.color = color;
    }

    /**
     * 获取画笔样式
     *
     * @return 画笔样式
     */
    public BasicStroke getStroke() {
        return stroke;
    }

    /**
     * 设置画笔样式
     *
     * @param stroke 画笔样式
     */
    public void setStroke(BasicStroke stroke) {
        this.stroke = stroke;
    }

    /**
     * 设置是否突出绘制数据点
     *
     * @param shapeVisible true-突出绘制数据点，false-不突出绘制数据点
     */
    public void setShapeVisible(boolean shapeVisible) {
        this.shapeVisible = shapeVisible;
    }

    /**
     * 判断是否突出绘制数据点
     *
     * @return true-突出绘制数据点，false-不突出绘制数据点
     */
    public boolean isShapeVisible() {
        return shapeVisible;
    }

    /**
     * @return the curveVisible
     */
    public boolean isCurveVisible() {
        return curveVisible;
    }

    /**
     * @param curveVisible the curveVisible to set
     */
    public void setCurveVisible(boolean curveVisible) {
        this.curveVisible = curveVisible;
    }
}
